package com.caosy.grassthinkremote.entity.vo;

import com.caosy.grassthinkremote.entity.User;
import lombok.Data;

@Data
public class UserReqVo {
    private String username;

    private String password;

    /**
     * 角色：1：管理员；2：普通用户
     */
    private Integer role;

    public User toUserEntity() {
        return User.builder()
                .username(this.username)
                .password(this.password)
                .role(this.role)
                .build();
    }
}
